function 任务控制类:设置打图任务(id)-----------------------------完成
 if 取角色等级(id)<65 then
   发送数据(玩家数据[id].连接id,7,"#Y/只有等级达到65级的角色才可领取此任务")
  elseif 玩家数据[id].队伍~=0 then
   发送数据(玩家数据[id].连接id,7,"#Y/该任务无法组队领取")
  elseif 角色处理类:GetTaskID(玩家数据[id],"宝图")~=0 then
      地图处理类:移除单位(任务数据[角色处理类:GetTaskID(玩家数据[id],"宝图")].地图编号,角色处理类:GetTaskID(玩家数据[id],"宝图"))
      角色处理类:取消任务(玩家数据[id],角色处理类:GetTaskID(玩家数据[id],"宝图"),id)
    角色处理类:扣除银子(玩家数据[id],2000,2)
    self:添加打图(id)
  elseif 取角色银子(id)<2000 then
   发送数据(玩家数据[id].连接id,7,"#Y/领取此任务需要消耗2000两银子")
  elseif  活动数据.打图[id] and 活动数据.打图[id] <=0 then
  	发送数据(玩家数据[id].连接id,7,"#Y/今日可打图的次数已经超出无法在领取任务")
  else
  	if 活动数据.打图[id] ==nil then
  	 活动数据.打图[id] =500
  	end
   角色处理类:扣除银子(玩家数据[id],2000,2)
   self:添加打图(id)
   end
 end
function 任务控制类:添加打图(id)--------------------------------完成
 local 飞贼地图={1506,1092,1070,1501,1142,1091}
 local 临时id6=tonumber(玩家数据[id].id.."6")
 local 地图编号6=飞贼地图[math.random(#飞贼地图)]
 local 临时坐标6=  地图处理类:Randomloadtion(地图编号6)
 local 地图名称6=MapData[地图编号6].名称
  local 姓 = {"赵","钱","孙","李","周","王","薛","时","傅","皮","范","彭","毛","滕","滕","方","谢","岑","诸葛","苏","黄","曹","刘","杨","张","吴","王","郑","周","赵","钱","李","孙","欧阳","南宫","上官","许","西门","毛","韦","曾","江","林","徐"}
  local 名 = {"大","二","三","发","杰","紫","青","则","玉","宝","若","可","恩","倭","武","金","又","本","复","开","泽","西","力","宏","汉","煜","忠","游","强","郎","胤","酆","潘","甫","七","明","尚"}
  local 氏 = {"强","伦","空","财","飞","天","井","来","狗","麻","若","佳","文","武","全","不二","男","黑","白","之"}
 任务数据[临时id6]={
 类型="宝图"
 ,分类=1
 ,id=id
 ,起始=os.time()
 ,结束=3600
 ,编号=1216
 ,任务id=临时id6
 ,地图编号=地图编号6
 ,地图名称=地图名称6
 ,名称=姓[math.random(#姓)]..名[math.random(#名)]..氏[math.random(#氏)]
 ,造型="强盗"
 ,次数=2
 ,方向=math.random(4)-1
 ,坐标=临时坐标6
 ,数字id=玩家数据[id].id
 ,战斗=false
 }
 地图处理类:添加单位(任务数据[临时id6])
 玩家数据[id].角色.任务数据[角色处理类:生成任务id(玩家数据[id])]=临时id6
 发送数据(玩家数据[id].连接id,7,"#Y/你领取了打图任务，请点击任务列表查看")
 活动数据.打图[id]=活动数据.打图[id]-1
 发送数据(玩家数据[id].连接id,9,"#xt/#Y/你剩余的打图次数为"..活动数据.打图[id])
 self:刷新追踪任务信息(id)
 end
function 任务控制类:完成打图任务(任务id,id)-------------------完成
  id=任务数据[任务id].数字id
 local 临时金钱=math.random(20000,35000)
 角色处理类:添加银子(玩家数据[id],临时金钱,"宝图")
 角色处理类:添加活跃度(玩家数据[id],1)
      地图处理类:移除单位(任务数据[任务id].地图编号,任务id)
      任务数据[任务id]=nil
      角色处理类:取消任务(玩家数据[id],任务id)
 if math.random(100)<=40 then
     道具处理类:给予道具(id,"藏宝图")
  else
       if math.random(100)<=30 then
        self:设置贼王任务(id)
       end
  end

 end
function 任务控制类:完成贼王任务(任务id,id)------------------完成
  id=任务数据[任务id].数字id
 local 临时金钱=math.random(50000,10000)
 角色处理类:添加银子(玩家数据[id],临时金钱,"贼王")
 道具处理类:给予道具(id,"藏宝图")
 角色处理类:添加活跃度(玩家数据[id],1)
 发送数据(玩家数据[id].连接id,7,"#Y/你获得了一张藏宝图")
 角色处理类:取消任务(玩家数据[id],任务id)
 地图处理类:移除单位(任务数据[任务id].地图编号,任务id)
 任务数据[任务id]=nil
 end
function 任务控制类:设置贼王任务(id)-------------------------完成
 local 飞贼地图={1502,1029,1101,1209,1026,1024,1198,1537,1504}
 local 临时id6=tonumber(玩家数据[id].id.."6")
 local 地图编号6=飞贼地图[math.random(#飞贼地图)]
 local 临时坐标6=地图处理类:Randomloadtion(地图编号6)
 local 地图名称6=MapData[地图编号6].名称
  local 姓 = {"赵","钱","孙","李","周","王","薛","时","傅","皮","范","彭","毛","滕","滕","方","谢","岑","诸葛","苏","黄","曹","刘","杨","张","吴","王","郑","周","赵","钱","李","孙","欧阳","南宫","上官","许","西门","毛","韦","曾","江","林","徐"}
  local 名 = {"大","二","三","发","杰","紫","青","则","玉","宝","若","可","恩","倭","武","金","又","本","复","开","泽","西","力","宏","汉","煜","忠","游","强","郎","胤","酆","潘","甫","七","明","尚"}
  local 氏 = {"强","伦","空","财","飞","天","井","来","狗","麻","若","佳","文","武","全","不二","男","黑","白","之"}
 任务数据[临时id6]={
  类型="宝图"
 ,分类="宝图"
 ,id=id
 ,起始=os.time()
 ,结束=3600
 ,编号=1216
 ,任务id=临时id6
 ,地图编号=地图编号6
 ,地图名称=地图名称6
 ,名称="贼王"..姓[math.random(#姓)]..名[math.random(#名)]..氏[math.random(#氏)]
 ,造型="山贼"
 ,次数=2
 ,方向=math.random(0,3)
 ,坐标=临时坐标6
 ,数字id=玩家数据[id].id
 ,战斗=false
 }
 地图处理类:添加单位(任务数据[临时id6])
 玩家数据[id].角色.任务数据[角色处理类:生成任务id(玩家数据[id])]=临时id6
 发送数据(玩家数据[id].连接id,7,"#Y/你领取了贼王任务，请点击任务列表查看")
 self:刷新追踪任务信息(id)
 end